<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
		<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
		<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
		<title>二手交易系统</title>
		<script type="text/javascript">
			/* document.addEventListener('plusready', function(){
   			//console.log("所有plus api都应该在此事件发生后调用，否则会出现plus is undefined。")
   			
   		}); */
		</script>
		<!-- 控制头部和底部导航样式 -->
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
		<script>
			//若用户未登录，则需先登录
			var logstatu = sessionStorage['LoginName'];
			console.log("name is "+name);
			console.log("statu is "+logstatu);
			if (!logstatu) {
				location.href = 'c_login.html';
				console.log(logstatu);
			}
		</script>
		<script src="js/login/register.js"></script>
		<script>$.mobile.ajaxEnabled = false;</script>
	</head>
	<body>

		<div data-role="page">
			<div data-role="header" data-position="fixed" id="opcitybg">
				<a id="headop" href="#" data-role="button" data-rel="back" data-icon="arrow-l" data-iconpos="notext"></a>
				<h1>地址详情</h1>
				<a id="headop" href="#" data-role="button" data-icon="plus" data-iconpos="notext"></a>
			</div>
			​
			<div data-role="main" class="ui-content">
				


				<ul class="defa" data-role="listview" data-inset="true">
					<li  data-icon="false">
						<a href="#">
							<img src="./img/location.jpg" data-icon="user">
							<h2>省市区</h2>
							<p>详细地址精确到能收到快递</p>
						</a>
					</li>
				</ul>

				<form class="defa" method="post" action="">
					<div class="ui-field-contain">
						<label for="province">省份：</label>
						<input type="text" name="province" id="province" placeholder="江西省">
						<label for="city">区县：</label>
						<input type="text" name="city" id="city" placeholder="南昌市青山湖区">
						<label for="email">详细地址:</label>
						<input type="text" name="detial" id="detial" placeholder="江西财经大学">
						<label for="tel">Tel(收货人):</label>
						<input type="tel" name="tel" id="tel" placeholder="18882022676">
					</div>
				</form>
			</div>



			<div data-role="footer" data-position="fixed" id="footerbg">

				<div data-role="navbar">
					<ul>
						<li><a id="modify" data-icon="check">保存</a></li>
						<li><a href="c_location.html" data-icon="delete">取消</a></li>
					</ul>
				</div>

			</div>
		</div>
		<script>
		var addressObj ={province:"",detial :"",addrTel : ""};
		
		function updateValue(){
			addressObj.province=$("#province").val()+$("#city").val();
			addressObj.detial = $("#detial").val();
			addressObj.addrTel = $("#tel").val();
			return addressObj;
		}
		
		//修改数据
		$("#modify").click(function(){
			addressObj =updateValue();
			alert("保存成功");
			if(addAddr(addressObj))
				location.href="c_location.html";
		})
		
		</script>


	</body>
</html>
